<!DOCTYPE html>
<html lang="zh">
<head>
    <meta charset="UTF-8" />
    <title>SQL 注入检测器 | BERT</title>
    <script src="/static/main.js" defer></script>
    <style>
        body {
            font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
            background-color: #f5f7fa;
            margin: 0;
            padding: 20px;
            color: #333;
        }

        .container {
            max-width: 800px;
            margin: auto;
            background: #fff;
            padding: 30px;
            border-radius: 12px;
            box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
        }

        h1 {
            text-align: center;
            color: #2c3e50;
            margin-bottom: 20px;
        }

        textarea {
            width: 100%;
            height: 150px;
            font-size: 16px;
            padding: 10px;
            border: 1px solid #ccc;
            border-radius: 8px;
            resize: vertical;
            box-shadow: inset 0 1px 3px rgba(0,0,0,0.1);
        }

        button {
            margin-top: 15px;
            padding: 12px 24px;
            font-size: 16px;
            color: #fff;
            background-color: #3498db;
            border: none;
            border-radius: 8px;
            cursor: pointer;
            transition: background-color 0.3s ease;
        }

        button:hover {
            background-color: #2980b9;
        }

        #result {
            margin-top: 20px;
            font-size: 20px;
            font-weight: bold;
            color: #2c3e50;
            text-align: center;
        }

        h2 {
            margin-top: 40px;
            color: #2c3e50;
            font-size: 20px;
            border-bottom: 2px solid #eee;
            padding-bottom: 5px;
        }

        #logContent {
            background: #1e1e1e;
            color: #00ff90;
            padding: 15px;
            border-radius: 8px;
            height: 300px;
            overflow: auto;
            font-family: monospace;
            font-size: 14px;
            white-space: pre-wrap;
            box-shadow: inset 0 2px 4px rgba(0,0,0,0.2);
        }
    </style>
</head>
<body>
    <div class="container">
        <h1>🔍 SQL 注入实时检测器（BERT）</h1>

        <textarea id="sqlInput" placeholder="请输入 SQL 语句... (Enter 提交，Ctrl+Enter 换行)"></textarea>
        <br />
        <button id="detectButton">🚀 检测</button>

        <div id="result"></div>

        <h2>📜 检测日志：</h2>
        <pre id="logContent"></pre>
    </div>
</body>
</html>
